import axios from '@/libs/api.request'
import config from '@/../src/config/index';

const defaultWmsUrl = process.env.NODE_ENV === 'development'
    ? config.wmsUrl.dev
    : process.env.VUE_APP_MODE === 'testEnvironment'
        ? config.wmsUrl.dev
        :  process.env.VUE_APP_MODE === 'temporary'
            ? config.wmsUrl.temporary
            :  process.env.VUE_APP_MODE === 'prod'
                ? config.wmsUrl.pro
                : config.wmsUrl.dev;


// 入库单据
export function getIntoOrderData(query) {
  return axios.request({
    url: '/api/wms_into_order/page',
    method: 'post',
    data: query
  })
}

// 根据出库单据获取明细
export function getDetailByOrderNum(body) {
  return axios.request({
    url: '/api/wmsOutOrder/getDetailByOrderNum',
    method: 'post',
    data: body
  })
}

// 出库单据
export function getOutOrderData(query) {
  return axios.request({
    url: '/api/wmsOutOrder/page',
    method: 'post',
    data: query
  })
}

// 导出单据明细
export function exportOutDataList(query) {
  return axios.request({
    url: '/api/wmsOutOrder/exportPage',
    method: 'post',
    data: query
  })
}

// 出库单头

export function getOutOrderHeadData(query) {
  return axios.request({
    url: '/api/wms_out_order_hd/page',
    method: 'post',
    data: query
  })
}

// 导出出库单头
export function exportOutHDDataList(query) {
  return axios.request({
    url: '/api/wms_out_order_hd/exportPage',
    method: 'post',
    data: query,
    responseType: 'blob'
  })
}

// 出入库统计
export function getOutInBoundStatus(query) {
  return axios.request({
    url: '/api/wms_out_order_hd/outInBoundStatus',
    method: 'post',
    data: query
  })
}

// 出入库任务统计(天)
export function outInTaskDayStatistics(query) {
  return axios.request({
    url: '/api/wms_out_order_hd/outInTaskDayStatistics',
    method: 'post',
    data: query
  })
}

// 出入库任务统计(小时)
export function outInTaskHourStatistics(query) {
  return axios.request({
    url: '/api/wms_out_order_hd/outInTaskHourStatistics',
    method: 'post',
    data: query
  })
}

// 库存库位统计
export function getStatisticsData(query) {
  return axios.request({
    url: '/api/wms_stock_statistics/page',
    method: 'post',
    data: query
  })
}

// 开启定时器
export function openTaskTime() {
  return axios.request({
    url: '/api/wms_stock_statistics/openTaskTime',
    method: 'post'
  })
}

// 关闭定时器
export function cancelTaskTime() {
  return axios.request({
    url: '/api/wms_stock_statistics/cancelTaskTime',
    method: 'post'
  })
}

//获取合托单据信息
export function getMergePalletWare(query) {
  return axios.request({
    url: '/api/wms_merge_pallet_order/page',
    method: 'post',
    data: query
  })
}

//获取合托单据信息明细
export function getMergePalletWareDetail(query) {
  return axios.request({
    url: '/api/wms_merge_pallet_order_detail/getDataByorderNum',
    method: 'post',
    data: query
  })
}

// 根据订单编号和单据子项
export function getDataByOrderNum(query) {
  return axios.request({
    url: '/api/wms_into_order/getDataByOrderNum',
    method: 'post',
    data: query
  })
}

// 识别跟新订单
export function updateDataByOrderNum(query) {
  return axios.request({
    url: '/api/wms_into_order/updateDataByOrderNum',
    method: 'post',
    data: query
  })
}

// 识别保存订单
export function saveDataByOrderNum(query) {
  return axios.request({
    url: '/api/wms_into_order/saveDataByOrderNum',
    method: 'post',
    data: query
  })
}

// 导出入库单据
export function exportDataList(query) {
  return axios.request({
    url: '/api/wms_into_order/exportPage',
    method: 'post',
    data: query,
    responseType: 'blob'
  })
}



// 入库查询托盘
export function getIntoTrace(query) {
  return axios.request({
    url: '/api/wms_tran_task_item/getIntoTrace',
    method: 'post',
    data: query
  })
}

// 出库托数
export function traceNum(query) {
  return axios.request({
    url: '/api/wms_out_tran_task_item/traceNum',
    method: 'post',
    data: query
  })
}

// 出库查询托盘
export function getOutTrace(query) {
  return axios.request({
    url: '/api/wms_out_tran_task_item/getOutTrace',
    method: 'post',
    data: query
  })
}

// 入库托数
export function traceSummary(query) {
  return axios.request({
    url: '/api/wms_tran_task_item/traceSummary',
    method: 'post',
    data: query
  })
}

// 获取出库工作台
export function getOutWbCode() {
  return axios.request({
    url: '/api/wms_work_bench/getOutWbCode',
    method: 'post'
  })
}

// 合托任务
export function doMergeTask(query) {
  return axios.request({
    url: '/iwcs/services/rest/rpcService/frontExecute',
    method: 'post',
    data: query
  })
}

// 合托确认
export function frontModifyStore(query) {
  return axios.request({
    url: '/iwcs/services/rest/rpcService/frontModifyStore',
    method: 'post',
    data: query
  })
}

// 库存库位统计导出
export function exportData(query) {
  return axios.request({
    url: '/api/wms_stock_statistics/exportData',
    method: 'post',
    data: query
  })
}

// 获取入库计划
export function getIntoPlanData(query) {
  return axios.request({
    url: '/api/wms_in_plan/page',
    method: 'post',
    data: query
  })
}

// 点击获取入库明细
export function getIntoPlanDetailData(query) {
  return axios.request({
    url: '/api/wms_in_plan/selectByInPlanOrderNum',
    method: 'post',
    data: query
  })
}

// 新增入库计划
export function createInPlanAndInPlanDetail(query) {
  return axios.request({
    url: '/api/wms_in_plan/createInPlanAndInPlanDetail',
    method: 'post',
    data: query
  })
}

//删除入库计划
export function deleteInPlan(query) {
  return axios.request({
    url: '/api/wms_in_plan/deleteInPlan',
    method: 'post',
    data: query
  })
}

// 获取编辑数据
export function updateInPlanAndInPlanDetail(query) {
  return axios.request({
    url: '/api/wms_in_plan/updateInPlanAndInPlanDetail',
    method: 'post',
    data: query
  })
}

// 到货登记
export function createIntoOrder(query) {
  return axios.request({
    url: '/api/wms_in_plan/createIntoOrder',
    method: 'post',
    data: query
  })
}

// 取消登记
export function cancleIntoOrder(query) {
  return axios.request({
    url: '/api/wms_in_plan/cancleIntoOrder',
    method: 'post',
    data: query
  })
}

// 入库计划单异常完结
export function exceptionFinishPlan(query) {
  return axios.request({
    url: '/api/wms_in_plan/exceptionFinishPlan',
    method: 'post',
    data: query
  })
}

// 出库计划单异常完结
export function exceptionFinishOutPlan(query) {
  return axios.request({
    url: '/api/wms_out_plan/exceptionFinishPlan',
    method: 'post',
    data: query
  })
}

// 获取编辑数据
export function getEditDataByIntoPlanCode(query) {
  return axios.request({
    url: '/api/wms_in_plan/getEditDataByIntoPlanCode',
    method: 'post',
    data: query
  })
}

//获取质检数据
export function getQualityDetail(query) {
  return axios.request({
    url: '/iwms/services/rest/rpcService/containerWms/getQualityDetail',
    method: 'post',
    data: query
  })
}

// 入库计划导出查询
export function exportPage(query) {
  return axios.request({
    url: '/api/wms_in_plan/exportPage',
    method: 'post',
    data: query
  })
}

// 导出勾选
export function exportList(query) {
  return axios.request({
    url: '/api/wms_in_plan/exportList',
    method: 'post',
    data: query
  })
}

// 获取出库库存信息
export function getOutPlanModalData(query) {
  return axios.request({
    url: '/api/wms_stock/page',
    method: 'post',
    data: query
  })
}

// 获取出库计划
export function getOutPlanData(query) {
  return axios.request({
    url: '/api/wms_out_plan/page',
    method: 'post',
    data: query
  })
}

// 点击获取出库明细
export function getOutPlanDetailData(query) {
  return axios.request({
    url: '/api/wms_out_plan/selectByOutPlanOrderNum',
    method: 'post',
    data: query
  })
}

// 新增出库计划
export function createOutPlanAndOutPlanDetail(query) {
  return axios.request({
    url: '/api/wms_out_plan/createOutPlanAndOutPlanDetail',
    method: 'post',
    data: query
  })
}

// 获取编辑出库数据
export function getEditDataByWmsStock(query) {
  return axios.request({
    url: '/api/wms_out_plan/getEditDataByWmsStock',
    method: 'post',
    data: query
  })
}

//出库计划删除
export function deleteOutPlan(query) {
  return axios.request({
    url: '/api/wms_out_plan/deleteOutPlan',
    method: 'post',
    data: query
  })
}

// 出库计划编辑数据
export function updateOutPlanAndOutPlanDetail(query) {
  return axios.request({
    url: '/api/wms_out_plan/updateOutPlanAndOutPlanDetail',
    method: 'post',
    data: query
  })
}

//查看是否清库
export function checkOutNum(query) {
  return axios.request({
    url: '/api/wms_out_plan/select_if_stock_num',
    method: 'post',
    data: query
  })
}

// 出库登记
export function outPlanRegister(query) {
  return axios.request({
    url: '/api/wms_out_plan/outPlanRegister',
    method: 'post',
    data: query
  })
}

// 出库登记取消
export function cancelRegist(query) {
  return axios.request({
    url: '/api/wms_out_plan/cancelRegist',
    method: 'post',
    data: query
  })
}

// 获取入库服务
export function getAllInPlanService(query) {
  return axios.request({
    url: '/api/wms_in_plan_service/getAllInPlanService',
    method: 'post',
    data: query
  })
}

// 删除入库服务
export function deleteInPlanService(query) {
  return axios.request({
    url: '/api/wms_in_plan_service/deleteInPlanService',
    method: 'post',
    data: query
  })
}

// 新增入库服务
export function addInPlanService(query) {
  return axios.request({
    url: '/api/wms_in_plan_service/addInPlanService',
    method: 'post',
    data: query
  })
}

// 编辑入库服务
export function updateInPlanService(query) {
  return axios.request({
    url: '/api/wms_in_plan_service/updateInPlanService',
    method: 'post',
    data: query
  })
}

// 检测确认
export function qualityConfirm(body) {
  return axios.request({
    url: '/api/wms_quality/qualityConfirm',
    method: 'post',
    data: body
  })
}

// 入库打印
export function printInPlan(query) {
  return axios.request({
    url: '/api/wms_in_plan/printInPlan',
    method: 'post',
    data: query
  })
}

// 入库打印 new
export function printNewInPlan(query, wmsUrl= defaultWmsUrl) {
  return axios.request({
    url: wmsUrl + '/api/wms_in_plan/printNewInPlan',
    method: 'post',
    data: query
  })
}

// 出库打印
export function printOutPlan(query, wmsUrl= defaultWmsUrl) {
  return axios.request({
    url: wmsUrl + '/api/wms_out_plan/printOutPlan',
    method: 'post',
    data: query
  })
}

// 出库打印 new
export function printNewOutPlan(query) {
  return axios.request({
    url: '/api/wms_out_plan/printNewOutPlan',
    method: 'post',
    data: query
  })
}

// 出库导出
export function exportOutList(query) {
  return axios.request({
    url: '/api/wms_out_plan/exportOutList',
    method: 'post',
    data: query
  })
}

// 查询
export function exportOutPage(query) {
  return axios.request({
    url: '/api/wms_out_plan/exportOutPage',
    method: 'post',
    data: query
  })
}

// 获取客户列表
export function getByCustomerType(query, wmsUrl= defaultWmsUrl) {
  return axios.request({
    url: wmsUrl + '/api/wms_customer/selectByCustomerType',
    method: 'post',
    data: query
  })
}

//拆托界面获取数据
export function partPalletOrder(query) {
  return axios.request({
    url: '/api/wms_part_pallet_order/page',
    method: 'post',
    data: query
  })
}

//根据拆托单据查询拆托结果
export function partPalletResult(query) {
  return axios.request({
    url: '/api/wms_part_pallet_result/page',
    method: 'post',
    data: query
  })
}

// 校验箱号
export function testContainerNumber(query) {
  return axios.request({
    url: '/testContainerNumber?containerNumber=' + query,
    method: 'get'
  })
}

// 查询计费模板
export function selectValidTemplate(query) {
  return axios.request({
    url: '/api/codec_fee_rate_project/selectValidTemplate',
    method: 'post',
    data: query
  })
}

// 计算费用
export function cashSettlement(query) {
  return axios.request({
    url: '/api/codec_fee_rate_project/cashSettlement',
    method: 'post',
    data: query
  })
}

// 确认金额
export function updateChargeMoney(query) {
  return axios.request({
    url: '/api/codec_fee_rate_project/updateChargeMoney',
    method: 'post',
    data: query
  })
}

//根据入库计划查询计费信息
export function selectChargeData(query) {
  return axios.request({
    url: '/api/wms_in_plan/selectChargeData',
    method: 'post',
    data: query
  })
}

//根据入库计划查询计费信息导出
export function exportCharge(query) {
  return axios.request({
    url: '/api/wms_in_plan/exportCharge',
    method: 'post',
    data: query,
    responseType: 'blob'
  })
}

//根据出库计划查询计费信息
export function selectOutChargeData(query) {
  return axios.request({
    url: '/api/wms_out_plan/selectChargeByOut',
    method: 'post',
    data: query
  })
}

//根据出库计划查询计费信息导出
export function exportOutCharge(query) {
  return axios.request({
    url: '/api/wms_out_plan/exportOutCharge',
    method: 'post',
    data: query,
    responseType: 'blob'
  })
}

//出库sn查询
export function getOutSn(query) {
  return axios.request({
    url: '/api/wms_out_tran_task_item/getOutSn',
    method: 'post',
    data: query
  })
}

// 备货呼叫
export const outPlanReadyStockCallOut = (data) => axios.request({
  url: '/iwms/services/rest/rpcService/containerWms/outPlanReadyStockCallOut',
  method: 'post',
  data
})

// 备货进度查询
export const getOutStockReady = (data) => axios.request({
  url: '/api/wms_out_tran_task_item/getOutStockReady',
  method: 'post',
  data
})

// 点击获取入库分色明细
export function getIntoPlanSeparateDetailData(query) {
  return axios.request({
    url: '/api/wms_separation_order/selectStockByDetail',
    method: 'post',
    data: query
  })
}

// 新增分色单
export function createIntoPlanSeparationOrder(query) {
  return axios.request({
    url: '/api/wms_separation_order/createSeparationOrder',
    method: 'post',
    data: query
  })
}

// 获取分色单详情
export function getSeparateDetail(query) {
  return axios.request({
    url: '/api/wms_separation_order/selectSeparationByNumAndItem',
    method: 'post',
    data: query
  })
}

// 编辑分色单
export function updateIntoPlanSeparationOrder(query) {
  return axios.request({
    url: '/api/wms_separation_order/updateSeparationOrder',
    method: 'post',
    data: query
  })
}

// 执行分色单
export function executeSeparate(query) {
  return axios.request({
    url: '/api/wms_separation_order/executeSeparation',
    method: 'post',
    data: query
  })
}

// 删除分色明细
export function deleteSeparateDetail(query) {
  return axios.request({
    url: '/api/wms_separation_order/deleteSeparation',
    method: 'post',
    data: query
  })
}

// 打印PDF
export function downLoadPdf(query) {
  return axios.request({
    url: '/iwms/services/rest/rpcService/containerWms/selectPdf',
    method: 'post',
    data: query
  })
}

// 押车放行
export function updateEscort(query) {
  return axios.request({
    url: '/api/wms_out_plan/outPlanEscort',
    method: 'post',
    data: query
  })
}

// 获取检测确认信息
export function qualityInfoByInPlan(query) {
  return axios.request({
    url: '/api/wms_into_order/selectQualityInfoByInPlan',
    method: 'post',
    data: query
  })
}


// 获取检测确认信息
export function checkRate(query) {
  return axios.request({
    url: '/api/codec_fee_rate_project/checkCustomerRate',
    method: 'get',
    params: query
  })
}

// 获取省市区地址
export function listAll() {
  return axios.request({
    url: '/common/zone/listAll',
    method: 'get'
  })
}

//分页获取分色单
export function getSeparationOrderData(query) {
  return axios.request({
    url: '/api/wms_separation_order_hd/page',
    method: 'post',
    data: query
  })
}

// 创建分色单
export function createSeparationOrder(query) {
  return axios.request({
    url: '/api/wms_separation_order_hd/createSeparationOrder',
    method: 'post',
    data: query
  })
}

// 分色单明细
export function getSeparateOrderDetail(query) {
  return axios.request({
    url: '/api/wms_separation_order_parent/page',
    method: 'post',
    data: query
  })
}

// 编辑分色单
export function updateSeparationOrder(query) {
  return axios.request({
    url: '/api/wms_separation_order_hd/updateSeparationOrder',
    method: 'post',
    data: query
  })
}

// 删除分色单
export function deleteSeparationOrder(query) {
  return axios.request({
    url: '/api/wms_separation_order_hd/deleteSeparationOrder',
    method: 'post',
    data: query
  })
}

// 获取分色单详情
export function querySeparationOrderDetail(query) {
  return axios.request({
    url: '/api/wms_separation_order_hd/querySeparationOrderDetail',
    method: 'post',
    data: query
  })
}

// 货权转移分页
export function getCargoData(data) {
  return axios.request({
    url: '/api/wms_stock_prop_change_order/page',
    method: 'post',
    data
  })
}

// 货权转移导出
export function exportCargoData(data) {
  return axios.request({
    url: '/api/wms_stock_prop_change_order/exportOwner',
    method: 'post',
    responseType: 'blob',
    data
  })
}

// 货权转移合计
export function getCargoSum(data) {
  return axios.request({
    url: '/api/wms_stock_prop_change_order/getSum',
    method: 'post',
    data
  })
}

// 装卸记录分页
export function getLoadData(data) {
  return axios.request({
    url: '/api/wms_in_plan/unloadRecordSelectPage',
    method: 'post',
    data
  })
}

// 装卸记录分页
export function exportLoadData(data) {
  return axios.request({
    url: '/api/wms_in_plan/unloadRecordExportList',
    method: 'post',
    responseType: 'blob',
    data
  })
}

// 装卸记录合计
export function unloadRecordSum(data) {
  return axios.request({
    url: '/api/wms_in_plan/unloadRecordSum',
    method: 'post',
    data
  })
}

// 入库计划导入模板
export function exportIntoModal(data) {
  return axios.request({
    url: '/api/wms_in_plan/exportIntoModal',
    method: 'post',
    responseType: 'blob',
    data
  })
}

// 入库箱号列表
export function inStockBusinessNumList(data) {
  return axios.request({
    url: '/api/wms_in_plan/inStockBusinessNumList',
    method: 'post',
    data
  })
}

// 入库箱号列表合计字段
export function inStockBusinessNumListSum(data) {
  return axios.request({
    url: '/api/wms_in_plan/inStockBusinessNumListSum',
    method: 'post',
    data
  })
}

// 入库托盘列表
export function inStockTraceCodeList(data) {
  return axios.request({
    url: '/api/wms_in_plan/inStockTraceCodeList',
    method: 'post',
    data
  })
}

// 入库托盘列表合计字段
export function inStockTraceCodeListSum(data) {
  return axios.request({
    url: '/api/wms_in_plan/inStockTraceCodeListSum',
    method: 'post',
    data
  })
}

// 出库车号列表
export function outStockBusinessNumList(data) {
  return axios.request({
    url: '/api/wms_out_plan/outStockBusinessNumList',
    method: 'post',
    data
  })
}

// 出库车号列表合计字段
export function outStockBusinessNumListSum(data) {
  return axios.request({
    url: '/api/wms_out_plan/outStockBusinessNumListSum',
    method: 'post',
    data
  })
}

// 出库托盘列表
export function outStockTraceCodeList(data) {
  return axios.request({
    url: '/api/wms_out_plan/outStockTraceCodeList',
    method: 'post',
    data
  })
}

// 出库托盘列表合计字段
export function outStockTraceCodeListSum(data) {
  return axios.request({
    url: '/api/wms_out_plan/outStockTraceCodeListSum',
    method: 'post',
    data
  })
}

// 出库押车费重新计费
export function releaseTimeChargeAgain(data) {
  return axios.request({
    url: '/api/codec_fee_rate_project/releaseChargeAgain',
    method: 'post',
    data: data
  })
}

// 货权转移重新计费
export function propTransferReChargeAgain(data) {
  return axios.request({
    url: '/api/codec_fee_rate_project/propTransferReChargeAgain',
    method: 'post',
    data: data
  })
}

// 分色重新计费
export function separationChargeAgain(data) {
  return axios.request({
    url: '/api/codec_fee_rate_project/separationChargeAgain',
    method: 'post',
    data: data
  })
}

// 货权转移计费列表
export function selectChargeByStockChange(query) {
  return axios.request({
    url: '/api/codec_charge/selectChargeByStockChange',
    method: 'post',
    data: query
  })
}

// 分色计费列表
export function selectChargeBySeparation(query) {
  return axios.request({
    url: '/api/codec_charge/selectChargeBySeparation',
    method: 'post',
    data: query
  })
}


// 分色列表合计
export function selectSeparationSummaryInfo(query) {
  return axios.request({
    url: '/api/wms_separation_order_hd/selectSeparationSummaryInfo',
    method: 'post',
    data: query
  })
}

// 获取打印分色单数据
export function querySeparationOrderPrintInfo(query) {
  return axios.request({
    url: '/api/wms_separation_order_hd/querySeparationOrderPrintInfo',
    method: 'post',
    data: query
  })
}
export function querySeparationPlanPrintInfo(query) {
  return axios.request({
    url: '/api/wms_stock_separation_plan/querySeparationPlanPrintInfo',
    method: 'post',
    data: query
  })
}

// 获取运营公司
export function selectCompanyByCustomer(query) {
  return axios.request({
    url: '/api/crm_customer_company_info/selectCompanyByCustomer',
    method: 'post',
    data: query
  })
}


// 新增出库服务
export function addOutPlanService(query) {
  return axios.request({
    url: '/api/wms_in_plan_service/addOutPlanService',
    method: 'post',
    data: query
  })
}

// 编辑出库服务
// export function updateInPlanService(query) {
//   return axios.request({
//     url: '/api/wms_in_plan_service/updateInPlanService',
//     method: 'post',
//     data: query
//   })
// }

export function pageStatistic(query) {
  return axios.request({
    url: '/api/wms_in_plan/pageStatistic',
    method: 'post',
    data: query
  })
}

export function outPageStatistic(query) {
  return axios.request({
    url: '/api/wms_out_plan/pageStatistic',
    method: 'post',
    data: query
  })
}

// 发送密钥
export const sendAuthenticationCode = data => axios.request({
  url: '/api/wms_authentication_record/sendAuthenticationCode',
  method: 'post',
  data
})
// 验证密钥
export const authenticate = data => axios.request({
  url: '/api/wms_authentication_record/authenticate',
  method: 'post',
  data
})

// 入库计划保存校验
export const checkOwnerContact = data => axios.request({
  url: '/api/wms_in_plan/checkOwnerContact',
  method: 'post',
  data
})

// 入库计划送货车信息
export function selectInCarDataByCarNo(query) {
  return axios.request({
    url: '/api/wms_in_car_info/selectInCarDataByCarNo',
    method: 'post',
    data: query
  })
}

// 入库计划提货车信息
export function selectCarDataByCarNoOut(query) {
  return axios.request({
    url: '/api/wms_in_car_info/selectCarDataByCarNoOut',
    method: 'post',
    data: query
  })
}

// 出库计划提货车信息
export function selectOutCarDataByCarNo(query) {
  return axios.request({
    url: '/api/wms_out_plan/selectOutCarDataByCarNo',
    method: 'post',
    data: query
  })
}

// 重新货权转移
export function goodTransferAgain(data) {
  return axios.request({
    url: '/api/wms_stock_prop_change_order/goodTransferAgain',
    method: 'post',
    data: data
  })
}

// 导出入库计划
export const exportInPlanList = (data) => axios.request({
  url: '/api/wms_in_plan/exportPage',
  method: 'post',
  responseType: 'blob',
  data
})

// 导出出库计划
export const exportOutPlanList = (data) => axios.request({
  url: '/api/wms_out_plan/exportOutPage',
  method: 'post',
  responseType: 'blob',
  data
})

// 校验预锁信息
export function checkLockInfoIsExist(containerNum, billOfLandingNo) {
  return axios.request({
    url: `/api/container_pre_lock/isExist/${containerNum}/${billOfLandingNo}`,
    method: 'get'
  })
}

// 获取供应链出库
export function getSupplyOutPlanData(query) {
  return axios.request({
    url: '/api/ccis_pledge_order/selectDtoPage',
    method: 'post',
    data: query
  })
}

// 获取供应链出库明细
export function selectByParentId(query) {
  return axios.request({
    url: '/api/ccis_pledge_order_detail/selectByParentId',
    method: 'post',
    data: query
  })
}

// 获取供应链出库库存明细
export function selectCcisPledgeOrderAndStockData(query) {
  return axios.request({
    url: '/api/ccis_pledge_order_detail/selectCcisPledgeOrderAndStockData',
    method: 'post',
    data: query
  })
}

// 待确认货转
export function selectPledgeDtoPage(query) {
  return axios.request({
    url: '/api/ccis_pledge_order/selectChangeOwnerPage',
    method: 'post',
    data: query
  })
}

// 待确认货转明细
export function selectPledgeDtoDetail(query) {
  return axios.request({
    url: '/api/ccis_pledge_order_detail/selectChangeOwnerDetailByParentId',
    method: 'post',
    data: query
  })
}

// 同步平台 取消货转
export function manualConfirm(query) {
  return axios.request({
    url: '/api/ccis_pledge_order/manualConfirm',
    method: 'post',
    data: query
  })
}

// 货物规格
export function selectPackInfoList(query) {
  return axios.request({
    url: '/api/wms_pack/selectPackInfo',
    method: 'post',
    data: query
  })
}


// 新增货物规格
export function addPack(query) {
  return axios.request({
    url: '/api/wms_pack/addPack',
    method: 'post',
    data: query
  })
}


// 自定义配置
export function selectByCurrentUser(query) {
  return axios.request({
    url: '/personalized_configuration/selectByCurrentUser',
    method: 'post',
    data: query
  })
}

export function saveOrUpdateCustomize(query) {
  return axios.request({
    url: '/personalized_configuration/saveOrUpdate',
    method: 'post',
    data: query
  })
}

export function deleteCustomize(query) {
  return axios.request({
    url: '/personalized_configuration/delete',
    method: 'post',
    data: query
  })
}

//获取当前系统环境
export function getSysFlag(query) {
  return axios.request({
    url: '/iwms/services/rest/rpcService/containerWms/getSysFlag',
    method: 'post',
    data: query
  })
}

//更新打印次数
export function updateIntoOrderPrintTimes(query) {
  return axios.request({
    url: '/api/wms_in_plan/updateIntoOrderPrintTimes',
    method: 'post',
    data: query
  })
}

//更新打印次数
export function updateOutOrderPrintTimes(query) {
  return axios.request({
    url: '/api/wms_out_plan/updateOutOrderPrintTimes',
    method: 'post',
    data: query
  })
}

export function getOrderList (orederNum) {
  return axios.request({
    url: `/api/wmsOutOrder/orderList/${orederNum}`,
    method: 'get'
  })
}

// 入库前校验是否已有对应批次信息
export function selectHistoryBatchInfoBeforeCreateInPlan(data) {
  return axios.request({
    url: '/api/wms_in_plan/selectHistoryBatchInfoBeforeCreateInPlan',
    method: 'post',
    data
  })
}

// 入库前校验单重
export function checkSingleWeight(data) {
  return axios.request({
    url: '/api/wms_in_plan/checkSingleWeight',
    method: 'post',
    data
  })
}